class Info < ActiveRecord::Base

  #pagination
  cattr_reader :per_page
  @@per_page = 4


  def self.get_categories
    ['hotel','turismo','dica']
  end

  def self.category_plural cat
    plurals = { 'hotel' => "hoteis",'turismo' => 'turismo' ,'outro' => 'outras','dica' => 'dicas'}
    plurals[cat]
  end

  [:title, :description].each { |a| validates_presence_of a, :message => 'missing' }

end

